package com.lysh.httpSession;

import com.lysh.httpSession.out.IOpenAiApi;
import okhttp3.sse.EventSource;

/**
 * @author liyishan
 * @date 2023/6/2 10:46
 * @apiNote
 */

public class DefaultOpenAiSession implements OpenAiSession{
    /**
     * 配置信息
     */
    private final Configuration configuration;

    /**
     * OpenAI 接口
     */
    private final IOpenAiApi openAiApi;
    /**
     * 工厂事件
     */
    private final EventSource.Factory factory;

    public DefaultOpenAiSession(Configuration configuration) {
        this.configuration = configuration;
        this.openAiApi = configuration.getOpenAiApi();
        this.factory = configuration.createRequestFactory();
    }
}
